package com.willcode.demo.registerbean.method4bean;

import com.willcode.demo.registerbean.method4bean.config.Demo4BeanConfig;
import com.willcode.demo.registerbean.method4bean.interfacee.IDemo4Bean;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * 客户端调用类
 * @author Will
 */
@RunWith(SpringRunner.class)
@SpringBootTest
@ContextConfiguration(classes = Demo4BeanConfig.class)
public class ClientSide {

    @Autowired
    private IDemo4Bean demo4Bean;

    @Test
    public void run() {
        System.out.println("demo4Bean值-" + demo4Bean);
        String s = demo4Bean.testDemo("测试@bean注册");
        System.out.println(s);
    }
}
